<?php
// Consultamos los datos de los caminos
$query = "SELECT t.id, t.alias, tc.title, tc.summary
		  FROM tours t
		  JOIN tour_content tc ON tc.tour_id = t.id
		  WHERE tc.language = '$lang'
			AND t.status = 1
			AND t.independent = 0
			ORDER BY t.position";
if (!$res20 = $db->runQuery($query)) {
	// log
} else {
	if (!$db->getRowCount($res20)) {
		// mensaje
	} else {
		$tours = array();
		while ($row20 = $db->getRow($res20)) {
			$tourAlias = $row20["alias"];
			$tourUrl = BASE_URL.$lang."/tours/".$tourAlias."/";
			$tourPicture = $tourAlias."-header.jpg";
			$tours[] = array(
				"id" => $row20["id"],
				"alias" => $tourAlias,
				"title" => utf8_encode($row20["title"]),
				"summary" => utf8_encode($row20["summary"]),
				"url" => $tourUrl,
				"picture" => $tourPicture
			);
		}
		$content->assign("tours", $tours);
		// Asignamos el resto de datos
		$content->multipleAssign(array("moreinfo"));
	}
}
?>
